# awk  -v feed=1000 -v VD=135 -f GenV.awk aaa >  config/VNS.veh
BEGIN	{ LaneLength = 3000; 
          i=0;x=0; N=0; phase = 0.0; range = 300; data = 555; period = 0.1;
          srand(feed);

          if(VD == 400)
	  	  {  lnd1 = 5; lnd2 = 10; lnd3 = 15;} 		# N = 2200 vehicles         
          if(VD == 300)
	  	  {  lnd1 = 7; lnd2 = 15; lnd3 = 25;} 		# N = 1498 vehicles         
          if(VD == 250)
	  	  {  lnd1 = 8; lnd2 = 20; lnd3 = 25;} 		# N = 1012 vehicles         
          if(VD == 200)
	  	  {  lnd1 = 10; lnd2 = 25; lnd3 = 35;} 		# N = 1012 vehicles         
          if(VD == 135)
	  	  {  lnd1 = 15; lnd2 = 35; lnd3 = 55;} 		# N = 658 vehicles
		  if(VD == 125)
		  {  lnd1 = 20; lnd2 = 30; lnd3 = 45; }		# N = 434 vehicles
		  if(VD == 116)
		  {  lnd1 = 25; lnd2 = 30; lnd3 = 40; }		# N = 396 vehicles
		  if(VD == 108)
		  {  lnd1 = 25; lnd2 = 35; lnd3 = 45; }		# N = 234 vehicles
		  if(VD == 95)
		  {  lnd1 = 25; lnd2 = 45; lnd3 = 55; }		# N = 234 vehicles
		  if(VD == 85)
		  {  lnd1 = 35; lnd2 = 45; lnd3 = 55; }		# N = 234 vehicles
		  if(VD == 75)
		  {  lnd1 = 50; lnd2 = 60; lnd3 = 70; }		# N = 234 vehicles
		  if(VD == 47)
		  {  lnd1 = 60; lnd2 = 75; lnd3 = 90; }		# N = 248 vehicles
		  if(VD == 35)
		  {  lnd1 = 80; lnd2 = 90; lnd3 = 110; }	# N = 102 vehicles
		  if(VD == 25)
		  {  lnd1 = 105; lnd2 = 125; lnd3 = 140; }	# N = 102 vehicles
		  if(VD == 23)
		  {  lnd1 = 140; lnd2 = 150; lnd3 = 160; }	# N = 102 vehicles
		  if(VD == 20)
		  {  lnd1 = 150; lnd2 = 160; lnd3 = 180; }	# N = 102 vehicles
		  if(VD == 19)
		  {  lnd1 = 175; lnd2 = 185; lnd3 = 190; }	# N = 102 vehicles
		  if(VD == 15)
		  {  lnd1 = 225; lnd2 = 235; lnd3 = 250; }	# N = 102 vehicles
		  if(VD == 11)
		  {  lnd1 = 275; lnd2 = 285; lnd3 = 390; }	# N = 102 vehicles
		  if(VD == 7)
		  {  lnd1 = 375; lnd2 = 485; lnd3 = 590; }	# N = 102 vehicles
		  if(VD == 5)
		  {  lnd1 = 500; lnd2 = 650; lnd3 = 790; }	# N = 102 vehicles
		  if(VD == 1)
		  {  lnd1 = 7000; lnd2 = 7500; lnd3 = 7900; }	# N = 102 vehicles

          while (x < LaneLength) {
            lane = 0; phase = period*rand();
            printf ("%d x\n%d lane\n%f range\n%f period\n%f phase\n%d data\n\n", x, lane, range, period, phase, data);
            lane = 5; phase = period*rand();
            printf ("%d x\n%d lane\n%f range\n%f period\n%f phase\n%d data\n\n", x, lane, range, period, phase, data);
            x += lnd1; 
            N+=2;
          }
	  	  x=0;
          while (x < LaneLength) {
            lane = 1; phase = period*rand();
            printf ("%d x\n%d lane\n%f range\n%f period\n%f phase\n%d data\n\n", x, lane, range, period, phase, data);
            lane = 4; phase = period*rand();
            printf ("%d x\n%d lane\n%f range\n%f period\n%f phase\n%d data\n\n", x, lane, range, period, phase, data);
            x += lnd2; 
            N+=2;
          }
          x=0;
          while (x < LaneLength) {
            lane = 2; phase = period*rand();
            printf ("%d x\n%d lane\n%f range\n%f period\n%f phase\n%d data\n\n", x, lane, range, period, phase, data);
            lane = 3; phase = period*rand();
            printf ("%d x\n%d lane\n%f range\n%f period\n%f phase\n%d data\n\n", x, lane, range, period, phase, data);
            x += lnd3; 
            N+=2;
          }

          printf ("%d\n", N);
        }
	{}
END	{ }
